<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .posi{
        position: sticky;
        top: 10px;
    }
    div{
        width: 300px;
        height: 300px;
        gap:10px;
    }
    body{
        height: 5200px;
    }
    .posi_parent{
        height: 4000px;;
    }
</style>
<body>
    <div class="posi_parent">
        <div>123</div>
        <div>123</div>
        <div class="posi">123</div>
    </div>
    
</body>
</html>